<template>
  <div class="web_user absolute">
    <div class="back">
      <img src="http://diandian.zgkpz.com/images/user/back.png" @click="back" />
    </div>
    <div class="main">
      <div class="main_background">
        <div class="wenzi">
          <div>手机号码：<label>1801455544</label></div>
          <div>今日闯关数：<label>4</label></div>
          <div>今日积分：<label>>512</label></div>
          <div>总得分：<label>5112</label></div>
          <div>学习总时长：<label>5小时16分30秒</label></div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
const NAME = "User";
export default {
  name: NAME,
  props: {},
  data: function () {
    return {
      userInfo: {},
    };
  },
  created() {
    window.addEventListener("resize", this.handleResize);
  },
  watch: {},
  mounted: function () {},
  methods: {
    handleResize() {
      if (document.body.clientWidth <= 768) {
        this.$router.replace({ path: "/user" });
      }
    },
    back() {
      this.$router.replace({ path: "/web/index" });
    },
  },
};
</script>

<style scoped>
.back {
  position: fixed;
  top: 3%;
  left: 2.5%;
}
.back img{
  width: .22rem;
}
.main,
.wenzi {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.main_background {
  width: 2.2rem;
  height: 3.2rem;
  background: url("http://diandian.zgkpz.com/images/user/back2.png") no-repeat;
  background-size: 100%100%;
}
.wenzi {
  color: #ffffff;
  font-size: 0.1rem;
  width: 100%;
  line-height: 0.33rem;
  margin-top: 0.37rem;
  padding-left: 0.3rem;
}
.wenzi label {
  color: #90376d;
}
.wenzi div:last-child{
  margin-top: .03rem;
}
</style>
